<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // \App\Models\User::factory(1)->create();
        DB::table('users')->insert([
            'name' => 'admin',
            'mobile' => 13915686959,
            'role_id' => 0,
            'company_id' => 1,
            'status' => 1,
            'created_at' => Date('Y-m-d H:i:s',time()),
            'updated_at' => Date('Y-m-d H:i:s',time()),
            'password' => Hash::make('123456'),
        ]);

        DB::table('companies')->insert([
            'title' => '总部企业',
            'logo' => '',
            'address' => '/',
            'expire' => Date('Y-m-d H:i:s',time()),
            'status' => 1,
            'created_at' => Date('Y-m-d H:i:s',time()),
            'updated_at' => Date('Y-m-d H:i:s',time()),
            'mobile' => 13915686959,
        ]);
    }
}
